package com.example.exam.service.impl;

import com.example.exam.mapper.TTextContentMapper;
import com.example.exam.pojo.entity.TTextContent;
import com.example.exam.service.ITextContentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.function.Function;

@Service
@Slf4j
public class TextContentServiceImpl implements ITextContentService {

    @Autowired
    private TTextContentMapper textContentMapper;

//    @Override
//    public <T, R> TTextContent jsonConvertInsert(List<T> list, Date now, Function<? super T, ? extends R> mapper) {
//
//        return null;
//    }


    @Override
    public TTextContent selectById(Integer id) {
        log.debug("开始处理【根据Id查询题目内容】的业务,id={}",id);
        TTextContent textContent = textContentMapper.selectById(id);
        return textContent;
    }
}
